package com.boarsoft.message.activemq;

import com.boarsoft.message.bean.Message;
import com.boarsoft.message.jms.JmsMsgConverter;
import com.boarsoft.soagov.spy.SvcSpy;

public class AmqProducerEx extends AmqProducer {
	/** */
	protected JmsMsgConverter converter;
	/** */
	protected SvcSpy svcSpy;

	public void put(Message msg) throws Exception {
		if (svcSpy != null && svcSpy.check(msg) != SvcSpy.CHECK_PASS) {
			return;
		}
		javax.jms.Message m = converter.convert(session, msg);
		producer.send(m);
	}

	public JmsMsgConverter getConverter() {
		return converter;
	}

	public void setConverter(JmsMsgConverter converter) {
		this.converter = converter;
	}

	public SvcSpy getSvcSpy() {
		return svcSpy;
	}

	public void setSvcSpy(SvcSpy svcSpy) {
		this.svcSpy = svcSpy;
	}
	
}
